<?php
class ModelMyplanCommon extends Model{
	public function registerUser($data){
		$this->db->query("insert into myplan_user set account='".$this->db->escape($data['account'])."',password='".$this->db->escape($data['password'])."',nickname='".$this->db->escape($data['nickname'])."',date_added=NOW()");
	}
	
	public function login($data){
		return $this->db->query("select * from myplan_user where account='".$this->db->escape($data['account'])."'");
	}
	
	public function getCategories() {
		$page=array(
		array('name'=>'计划新鲜事','page_id'=>'1','top'=>'1','column'=>'1','page_path'=>'news'),	
		array('name'=>'我的计划','page_id'=>'1','top'=>'1','column'=>'1','page_path'=>'myplanhome'),	
		array('name'=>'看看其他人','page_id'=>'1','top'=>'1','column'=>'1','page_path'=>'allusers'),
		array('name'=>'消息','page_id'=>'1','top'=>'1','column'=>'1','page_path'=>'information')
		); 
		
		return $page;
	}
	
	public function getChildren($id) {
				
		$children=array();
		
		return $children;
	}

}
?>